home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGASIC / BASFILES.LZH / OPENFILE.BAS < prev    next >
BASIC Source File  |  1988-09-10  |  328b  |  22 lines

  1. '$INCLUDE:'QBTOOLS.INC'
  2. '' '$INCLUDE: 'qbtools2.inc'
  3.  
  4. FUNCTION OpenFile% (FileName$, reclen%)
  5.  
  6.     IF FileExists%(FileName$) THEN
  7.  
  8.         w% = FREEFILE
  9.   
  10.         IF w% THEN
  11.             OPEN FileName$ FOR RANDOM AS #w% LEN = reclen%
  12.             OpenFile% = w%
  13.         ELSE
  14.             OpenFile% = 0
  15.         END IF
  16.     ELSE
  17.         OpenFile% = 0
  18.     END IF
  19.  
  20. END FUNCTION
  21.  
  22.